<template>
  <el-container>
    <el-header>
      <div class="logo">
        I8
        <small>Admin</small>
      </div>
      <el-menu
        :default-active="activeIndex"
        mode="horizontal"
        @select="handleSelect"
      >
        <el-menu-item index="1">
          <router-link to="/home/page2">
            <i class="el-icon-s-platform"></i>
            处理中心
          </router-link>
        </el-menu-item>
        <el-submenu index="2">
          <template slot="title">
            <i class="el-icon-s-cooperation"></i>
            我的工作台
          </template>
          <el-menu-item index="2-1">选项1</el-menu-item>
          <el-menu-item index="2-2">选项2</el-menu-item>
          <el-menu-item index="2-3">选项3</el-menu-item>
          <el-submenu index="2-4">
            <template slot="title">选项4</template>
            <el-menu-item index="2-4-1">选项1</el-menu-item>
            <el-menu-item index="2-4-2">选项2</el-menu-item>
            <el-menu-item index="2-4-3">选项3</el-menu-item>
          </el-submenu>
        </el-submenu>
        <el-menu-item index="3">
          <router-link to="/home/console/page1">
            <i class="el-icon-platform-eleme"></i>
            商店
          </router-link>
        </el-menu-item>
        <el-menu-item index="4">
          <a href="#">
            <i class="el-icon-video-camera-solid"></i>
            联系我们
          </a>
        </el-menu-item>
      </el-menu>
      <div>
        <el-input placeholder="请输入内容" v-model="input3" class="input-with-select">
          <el-button slot="append" icon="el-icon-search"></el-button>
        </el-input>
      </div>
      <div class="tools">
        <span>消息</span>
        <span>通知</span>
        <span>语言</span>
        <el-avatar shape="square"></el-avatar>
      </div>
    </el-header>
    <router-view></router-view>
  </el-container>
</template>

<script>
export default {
  data() {
    return {
      activeIndex: "1",
      activeIndex2: "1"
    };
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    }
  }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
a {
 text-decoration: none;
}
.el-container {
  height: 100%;
  .el-header {
    padding-left: 0px;
    background-color: #fff;
    color: #333;
    line-height: 60px;
    display: flex;
    .logo {
      width: 200px;
      font-size: 1.5rem;
      text-align: center;
    }
    .el-menu {
      flex: 1;
      .is-active{
        // box-shadow: 0px 10px 15px  rgba(0,123,255,0.1);
        background: linear-gradient(to bottom, transparent , rgba(0,123,255,0.1));
      }
    }
    .tools {
      text-align: center;
      background: red;
    }
  }
  .el-aside {
    background-color: #d3dce6;
    color: #333;
    line-height: 200px;
  }
  .el-main {
    padding: 0px;
    background-color: #e9eef3;
    color: #333;
  }
}
</style>
